import request from "../utils/request";

//获取砍价优惠规则列表
export function getBargainList(params) {
  return request({
    method: "get",
    url: "/api/OrderShareRule/Get",
    params
  });
}

//添加优惠规则
export function createBargain(data) {
  return request({
    method: "post",
    url: "/api/OrderShareRule/Create",
    data
  });
}

//优惠规则状态开关
export function setBargainState(data) {
  return request({
    method: "patch",
    url: "/api/OrderShareRule/Switch",
    data
  });
}

